﻿@using LyyCMS.Web.Startup
@using LyyCMS.Web.Models.Articles
@model ArticleListViewModel

@{ ViewBag.Title = L("Article");
    ViewBag.CurrentPageName = PageNames.Article; }
@section scripts
    {
    <environment names="Development">
        <script src="~/view-resources/Views/Article/Index.js" asp-append-version="true"></script>
    </environment>

    <environment names="Staging,Production">
        <script src="~/view-resources/Views/Article/Index.min.js" asp-append-version="true"></script>
    </environment>
    <script src="~/ueditor-1.4.3.3/ueditor.config.js"></script>
    <script src="~/ueditor-1.4.3.3/ueditor.all.js"></script>
    <script src="~/ueditor-1.4.3.3/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript">
        $(function () {
            var editor = UE.getEditor('container', {
                initialFrameHeight: 500
            });
            console.log(editor);
        });


    </script>
}

<section class="content-header">
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-6">
                <h1>@L("Article")</h1>
            </div>
            <div class="col-sm-6">
                <a asp-action="Create" asp-controller="Article" class="btn bg-blue float-sm-right">
                    <i class="fa fa-plus-square"></i>
                    @L("Create")
                </a>
            </div>
        </div>
    </div>
</section>
<section class="content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-header">
                        <div class="row">
                            <div class="col-md-6">
                                <!--Use for bulk actions-->
                            </div>
                            <div class="col-md-6">
                                @await Html.PartialAsync("~/Views/Article/Index.AdvancedSearch.cshtml")
                            </div>
                        </div>
                    </div>
                    <div class="card-body">
                        <div class="table-responsive">
                            <table id="ArticleTable" class="table table-striped table-bordered">
                                <thead>
                                    <tr>
                                        <th></th>
                                        <th>@L("Title")</th>
                                        <th>@L("Source")</th>
                                        <th>@L("CategoryName")</th>
                                        <th>@L("Red")</th>
                                        <th>@L("Status")</th>
                                        <th style="width: 150px">@L("Actions")</th>
                                    </tr>
                                </thead>
                                <tbody></tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

@await Html.PartialAsync("~/Views/Article/_CreateModal.cshtml", Model)

<div class="modal fade" id="ArticleEditModal" tabindex="-1" role="dialog" aria-labelledby="ArticleEditModalLabel" data-backdrop="static">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
        </div>
    </div>
</div>
